const { Service } = require("uni-cloud-router");
const uniID = require('uni-id');
const response=require("../utils/response.js");
const db = uniCloud.database({
	spaceId: 'b33db069-91a2-42ff-a831-31fbd5a04b97'
});
const dbCmd = db.command;
const collection=db.collection("opendb-city-china");
const $ = db.command.aggregate;
module.exports = class CityService extends Service {
  async getTree(ctx){
		const dbJQL = uniCloud.databaseForJQL({
			event:ctx.envent,
			context:ctx.context
		})
		return dbJQL.collection('opendb-city-china').get({
      getTree: {}
    })
  }
};